Virtualization allows multiplexing of an underlying host machine between different virtual machines. The host machine allocates a certain amount of its storage resources to each of the virtual machines. Each virtual machine is then able to use the allocated storage resources to execute applications, including operating systems (referred to as guest operating systems). Executable code that provides the virtualization is commonly referred to as a hypervisor (also known as a virtual machine monitor (VMM)). The hypervisor emulates the underlying hardware of the host computer, making the use of the virtual machine transparent to the guest operating system and the user of the computer.
A host machine can accommodate more virtual machines than the size of its physical memory allows. Using virtual memory techniques, the host machine can give each virtual machine the impression that the virtual machine has a contiguous address space, while in fact the memory used by the virtual machine may be physically fragmented and even overflow to disk storage. When the host machine frees memory, the host machine may select memory pages that have been assigned to virtual machines and page out the contents of the selected memory pages to disk storage. When the virtual machines attempt to access the memory pages, the host machine may page in the contents of the memory page by retrieving the contents from disk storage and writing the content back to memory. Reallocating memory between virtual machines may involve a large amount of input/output (I/O) and processing power, which may adversely affect performance of a host machine.